<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="@{include} :: header"></head>
<link href="css/bootstrap.min.css?v=3.3.6" th:href="@{/css/bootstrap.min.css?v=3.3.6}" rel="stylesheet">
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${wxuser.id}"  type="hidden">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">授权类型：</label>
                            <div class="col-sm-8">
                                <select data-placeholder="--请选择--" name="isAdmin" id="isAdmin" class="form-control chosen-select" onchange="selectIsAdmin()">
                                    <option th:value="0" th:selected="${wxuser.isAdmin eq 0}" th:text="取消管理员"></option>
                                    <option th:value="1" th:selected="${wxuser.isAdmin eq 1}" th:text="绑定管理员"></option>
                                </select>
                            </div>
                        </div>

                        <div id="divIsAdmin" class="form-group" th:classappend="${wxUser.isAdmin eq 1}  ? '' : 'hidden'">
                            <label class="col-sm-3 control-label">选择绑定用户：</label>
                            <div class="col-sm-8">
                                <select data-placeholder="--请选择--" name="sysUserId" id="sysUserId" class="form-control chosen-select">
                                    <th:block th:each="user : ${users}">
                                        <option th:value="${user.userId}" th:selected="${user.userId eq wxuser.sysUserId}" th:text="${user.name}+'('+${user.mobile}+')'"></option>
                                    </th:block>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" th:src="@{/js/appjs/module/wxUser/set_user_type.js}"></script>
</body>
</html>
